@codeyam/codeyam-cli 0.1.6 → 0.1.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/analyzer-template/.build-info.json +7 -7
- package/analyzer-template/log.txt +3 -3
- package/analyzer-template/package.json +6 -6
- package/analyzer-template/packages/ai/package.json +1 -1
- package/analyzer-template/packages/ai/src/lib/astScopes/astScopeAnalyzer.ts +34 -3
- package/analyzer-template/packages/ai/src/lib/completionCall.ts +14 -2
- package/analyzer-template/packages/ai/src/lib/dataStructure/ScopeDataStructure.ts +27 -0
- package/analyzer-template/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.ts +62 -0
- package/analyzer-template/packages/ai/src/lib/generateEntityScenarioData.ts +78 -2
- package/analyzer-template/packages/analyze/src/lib/ProjectAnalyzer.ts +6 -0
- package/analyzer-template/packages/analyze/src/lib/files/analyze/analyzeEntities.ts +9 -1
- package/analyzer-template/packages/analyze/src/lib/files/analyze/dependencyResolver.ts +0 -6
- package/analyzer-template/packages/analyze/src/lib/files/analyze/findOrCreateEntity.ts +12 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/TransformationTracer.ts +65 -28
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/generateDataStructure.ts +83 -0
- package/analyzer-template/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.ts +23 -4
- package/analyzer-template/packages/aws/package.json +1 -1
- package/analyzer-template/packages/database/index.ts +1 -0
- package/analyzer-template/packages/database/package.json +3 -3
- package/analyzer-template/packages/database/src/lib/kysely/db.ts +8 -0
- package/analyzer-template/packages/database/src/lib/kysely/tables/editorScenariosTable.ts +62 -0
- package/analyzer-template/packages/database/src/lib/loadCommits.ts +31 -20
- package/analyzer-template/packages/database/src/lib/loadReadyToBeCapturedAnalyses.ts +0 -5
- package/analyzer-template/packages/database/src/lib/updateCommitMetadata.ts +151 -135
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatus.ts +58 -42
- package/analyzer-template/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.ts +81 -65
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.ts +29 -1
- package/analyzer-template/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.ts +33 -5
- package/analyzer-template/packages/github/dist/database/index.d.ts +1 -0
- package/analyzer-template/packages/github/dist/database/index.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/index.js +1 -0
- package/analyzer-template/packages/github/dist/database/index.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts +2 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/db.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts +20 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.d.ts.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js +45 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts +5 -0
- package/analyzer-template/packages/github/dist/database/src/lib/kysely/tables/scenariosTable.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js +23 -13
- package/analyzer-template/packages/github/dist/database/src/lib/loadCommits.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/analyzer-template/packages/github/dist/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js +100 -89
- package/analyzer-template/packages/github/dist/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/analyzer-template/packages/github/dist/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/analyzer-template/packages/github/dist/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/github/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/github/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/packages/github/package.json +1 -1
- package/analyzer-template/packages/types/src/types/ProjectMetadata.ts +1 -0
- package/analyzer-template/packages/types/src/types/Scenario.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts +1 -0
- package/analyzer-template/packages/utils/dist/types/src/types/ProjectMetadata.d.ts.map +1 -1
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts +10 -0
- package/analyzer-template/packages/utils/dist/types/src/types/Scenario.d.ts.map +1 -1
- package/analyzer-template/playwright/captureFromUrl.ts +89 -82
- package/analyzer-template/project/constructMockCode.ts +136 -43
- package/analyzer-template/project/reconcileMockDataKeys.ts +19 -14
- package/analyzer-template/project/start.ts +3 -0
- package/analyzer-template/project/startScenarioCapture.ts +9 -0
- package/analyzer-template/project/writeClientLogRoute.ts +125 -0
- package/analyzer-template/project/writeMockDataTsx.ts +17 -0
- package/analyzer-template/project/writeScenarioComponents.ts +36 -7
- package/analyzer-template/tsconfig.json +13 -1
- package/background/src/lib/virtualized/project/constructMockCode.js +115 -34
- package/background/src/lib/virtualized/project/constructMockCode.js.map +1 -1
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js +17 -11
- package/background/src/lib/virtualized/project/reconcileMockDataKeys.js.map +1 -1
- package/background/src/lib/virtualized/project/start.js +2 -0
- package/background/src/lib/virtualized/project/start.js.map +1 -1
- package/background/src/lib/virtualized/project/startScenarioCapture.js +5 -0
- package/background/src/lib/virtualized/project/startScenarioCapture.js.map +1 -1
- package/background/src/lib/virtualized/project/writeClientLogRoute.js +110 -0
- package/background/src/lib/virtualized/project/writeClientLogRoute.js.map +1 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js +12 -0
- package/background/src/lib/virtualized/project/writeMockDataTsx.js.map +1 -1
- package/background/src/lib/virtualized/project/writeScenarioComponents.js +29 -7
- package/background/src/lib/virtualized/project/writeScenarioComponents.js.map +1 -1
- package/codeyam-cli/scripts/apply-setup.js +208 -11
- package/codeyam-cli/scripts/apply-setup.js.map +1 -1
- package/codeyam-cli/src/cli.js +2 -0
- package/codeyam-cli/src/cli.js.map +1 -1
- package/codeyam-cli/src/commands/analyze.js +17 -7
- package/codeyam-cli/src/commands/analyze.js.map +1 -1
- package/codeyam-cli/src/commands/default.js +58 -3
- package/codeyam-cli/src/commands/default.js.map +1 -1
- package/codeyam-cli/src/commands/editor.js +1839 -0
- package/codeyam-cli/src/commands/editor.js.map +1 -0
- package/codeyam-cli/src/commands/init.js +40 -11
- package/codeyam-cli/src/commands/init.js.map +1 -1
- package/codeyam-cli/src/commands/memory.js +26 -2
- package/codeyam-cli/src/commands/memory.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js +246 -0
- package/codeyam-cli/src/utils/__tests__/editorAudit.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js +126 -0
- package/codeyam-cli/src/utils/__tests__/editorDevServer.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js +295 -0
- package/codeyam-cli/src/utils/__tests__/editorJournal.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js +270 -0
- package/codeyam-cli/src/utils/__tests__/editorMockState.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js +100 -0
- package/codeyam-cli/src/utils/__tests__/editorPreloadHelpers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js +147 -0
- package/codeyam-cli/src/utils/__tests__/editorPreview.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js +76 -0
- package/codeyam-cli/src/utils/__tests__/editorScenarios.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js +134 -0
- package/codeyam-cli/src/utils/__tests__/git.editor.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js +9 -0
- package/codeyam-cli/src/utils/__tests__/pathIgnoring.test.js.map +1 -1
- package/codeyam-cli/src/utils/__tests__/project.test.js +65 -0
- package/codeyam-cli/src/utils/__tests__/project.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js +121 -0
- package/codeyam-cli/src/utils/__tests__/scenarioMarkers.test.js.map +1 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js +26 -0
- package/codeyam-cli/src/utils/__tests__/setupClaudeCodeSettings.test.js.map +1 -1
- package/codeyam-cli/src/utils/backgroundServer.js +19 -3
- package/codeyam-cli/src/utils/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/utils/buildFlags.js +4 -0
- package/codeyam-cli/src/utils/buildFlags.js.map +1 -0
- package/codeyam-cli/src/utils/devModeEvents.js +40 -0
- package/codeyam-cli/src/utils/devModeEvents.js.map +1 -0
- package/codeyam-cli/src/utils/editorAudit.js +82 -0
- package/codeyam-cli/src/utils/editorAudit.js.map +1 -0
- package/codeyam-cli/src/utils/editorDevServer.js +98 -0
- package/codeyam-cli/src/utils/editorDevServer.js.map +1 -0
- package/codeyam-cli/src/utils/editorJournal.js +137 -0
- package/codeyam-cli/src/utils/editorJournal.js.map +1 -0
- package/codeyam-cli/src/utils/editorMockState.js +248 -0
- package/codeyam-cli/src/utils/editorMockState.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js +64 -0
- package/codeyam-cli/src/utils/editorPreloadHelpers.js.map +1 -0
- package/codeyam-cli/src/utils/editorPreview.js +66 -0
- package/codeyam-cli/src/utils/editorPreview.js.map +1 -0
- package/codeyam-cli/src/utils/editorScenarios.js +56 -0
- package/codeyam-cli/src/utils/editorScenarios.js.map +1 -0
- package/codeyam-cli/src/utils/fileMetadata.js +5 -0
- package/codeyam-cli/src/utils/fileMetadata.js.map +1 -1
- package/codeyam-cli/src/utils/fileWatcher.js +25 -9
- package/codeyam-cli/src/utils/fileWatcher.js.map +1 -1
- package/codeyam-cli/src/utils/git.js +103 -0
- package/codeyam-cli/src/utils/git.js.map +1 -1
- package/codeyam-cli/src/utils/install-skills.js +55 -13
- package/codeyam-cli/src/utils/install-skills.js.map +1 -1
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js +126 -0
- package/codeyam-cli/src/utils/interactiveSyncWatcher.js.map +1 -0
- package/codeyam-cli/src/utils/pathIgnoring.js +19 -7
- package/codeyam-cli/src/utils/pathIgnoring.js.map +1 -1
- package/codeyam-cli/src/utils/project.js +15 -5
- package/codeyam-cli/src/utils/project.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js +11 -11
- package/codeyam-cli/src/utils/queue/__tests__/heartbeat.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js +22 -0
- package/codeyam-cli/src/utils/queue/__tests__/manager.test.js.map +1 -1
- package/codeyam-cli/src/utils/queue/heartbeat.js +13 -5
- package/codeyam-cli/src/utils/queue/heartbeat.js.map +1 -1
- package/codeyam-cli/src/utils/queue/job.js +70 -1
- package/codeyam-cli/src/utils/queue/job.js.map +1 -1
- package/codeyam-cli/src/utils/queue/manager.js +7 -6
- package/codeyam-cli/src/utils/queue/manager.js.map +1 -1
- package/codeyam-cli/src/utils/scenarioMarkers.js +134 -0
- package/codeyam-cli/src/utils/scenarioMarkers.js.map +1 -0
- package/codeyam-cli/src/utils/serverState.js +27 -2
- package/codeyam-cli/src/utils/serverState.js.map +1 -1
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js +45 -4
- package/codeyam-cli/src/utils/setupClaudeCodeSettings.js.map +1 -1
- package/codeyam-cli/src/utils/testRunner.js +158 -0
- package/codeyam-cli/src/utils/testRunner.js.map +1 -0
- package/codeyam-cli/src/utils/transcriptPruning.js +67 -0
- package/codeyam-cli/src/utils/transcriptPruning.js.map +1 -0
- package/codeyam-cli/src/utils/webappDetection.js +14 -2
- package/codeyam-cli/src/utils/webappDetection.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/database.js +41 -27
- package/codeyam-cli/src/webserver/app/lib/database.js.map +1 -1
- package/codeyam-cli/src/webserver/app/lib/dbNotifier.js.map +1 -1
- package/codeyam-cli/src/webserver/backgroundServer.js +109 -19
- package/codeyam-cli/src/webserver/backgroundServer.js.map +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{CopyButton-CtmbP4Gl.js → CopyButton-DmJveP3T.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityItem-DlMph_Hm.js → EntityItem-C76mRRiF.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeBadge-B-0PjGOU.js → EntityTypeBadge-g3saevPb.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{EntityTypeIcon-DN9eiJAO.js → EntityTypeIcon-CobE682z.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-Bu6c6aDe.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{InteractivePreview-rE_fI2h2.js → InteractivePreview-DYFW3lDD.js} +3 -3
- package/codeyam-cli/src/webserver/build/client/assets/{LibraryFunctionPreview-CnatsCw2.js → LibraryFunctionPreview-DLeucoVX.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LoadingDots-CSP6DZrh.js → LoadingDots-BU_OAEMP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{LogViewer-CMK8Q7yk.js → LogViewer-ceAyBX-H.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ReportIssueModal-TCV_HBjy.js → ReportIssueModal-djPLI-WV.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{SafeScreenshot-CG2uh31y.js → SafeScreenshot-BED4B6sP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{ScenarioViewer-CU_TDYd8.js → ScenarioViewer-B76aig_2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/Spinner-Bb5uFQ5V.js +34 -0
- package/codeyam-cli/src/webserver/build/client/assets/Terminal-Dnj5CY9R.js +41 -0
- package/codeyam-cli/src/webserver/build/client/assets/{TruncatedFilePath-D7IoaWUW.js → TruncatedFilePath-C8OKAR5x.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{_index-B8z7mjR-.js → _index-C96V0n15.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{activity.(_tab)-DZu78RI1.js → activity.(_tab)-BpKzcsJz.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/addon-fit-CUXOrorO.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/addon-web-links-Duc5hnl7.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-D9hemwl6.js +22 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.dev-mode-events-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-audit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-capture-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-client-errors-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-dev-server-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-entity-status-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-entry-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-screenshot-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-journal-update-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-load-commit-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-refresh-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-register-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-data-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenario-image._-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-scenarios-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-switch-scenario-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/api.editor-test-results-l0sNRNKZ.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{book-open-Bp5FLkd4.js → book-open-D_nMCFmP.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chevron-down-DQJA9f4o.js → chevron-down-BH2h1Ea2.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{chunk-JZWAC4HX-7VptmeIr.js → chunk-JZWAC4HX-C4pqxYJB.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{circle-check-B6C4LY9o.js → circle-check-DyIKORY6.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{copy-6nzYCu0G.js → copy-NDbZjXao.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{createLucideIcon-D-QUFOwe.js → createLucideIcon-CMT1jU2q.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-BiM6z3Do.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/editor-D1DAKXtT.js +8 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha._--zvFJ4OH.js → entity._sha._-CrjR3zZW.js} +10 -10
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.dev-DkzqFzFj.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-C28BiQzt.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-p9hhkjJM.js +6 -0
- package/codeyam-cli/src/webserver/build/client/assets/{entity._sha_.edit._scenarioId-C7ysA4Jq.js → entity._sha_.edit._scenarioId-BMvVHNXU.js} +2 -2
- package/codeyam-cli/src/webserver/build/client/assets/{entry.client-CU6EUArK.js → entry.client-DTvKq3TY.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{fileTableUtils-EWpfFU4X.js → fileTableUtils-cPo8LiG3.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{files-CrxAoWIL.js → files-DO4CZ16O.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{git-BldHtKeW.js → git-CFCTYk9I.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/globals-B17TBSS6.css +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{index-7-1FmlHo.js → index-10oVnAAH.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{index-DuYcwYp_.js → index-BcvgDzbZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{labs-CPPVOSWB.js → labs-Zk7ryIM1.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{loader-circle-BnDcD54R.js → loader-circle-BAXYRVEO.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-a632de18.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/memory-Dg0mvYrI.js +96 -0
- package/codeyam-cli/src/webserver/build/client/assets/{pause-DhQX2g22.js → pause-DTAcYxBt.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/root-DUKqhFlb.js +67 -0
- package/codeyam-cli/src/webserver/build/client/assets/{search-DborVoKD.js → search-fKo7v0Zo.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/settings-DfuTtcJP.js +1 -0
- package/codeyam-cli/src/webserver/build/client/assets/{simulations-BtrtCYJg.js → simulations-B3aOzpCZ.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{terminal-Bs4NC-VZ.js → terminal-BG4heKCG.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{triangle-alert-DTf3Jojp.js → triangle-alert-DtSmdtM4.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useCustomSizes-D_bDZyDU.js → useCustomSizes-ByhSyh0W.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-C14nCb1q.js +2 -0
- package/codeyam-cli/src/webserver/build/client/assets/{useReportContext-BsQb6rFd.js → useReportContext-O-jkvSPx.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/{useToast-BOur3mUv.js → useToast-9FIWuYfK.js} +1 -1
- package/codeyam-cli/src/webserver/build/client/assets/xterm-BqvuqXEL.js +27 -0
- package/codeyam-cli/src/webserver/build/server/assets/index-HfLydfDq.js +1 -0
- package/codeyam-cli/src/webserver/build/server/assets/server-build-CUu_F-oo.js +366 -0
- package/codeyam-cli/src/webserver/build/server/index.js +1 -1
- package/codeyam-cli/src/webserver/build-info.json +5 -5
- package/codeyam-cli/src/webserver/devServer.js +39 -5
- package/codeyam-cli/src/webserver/devServer.js.map +1 -1
- package/codeyam-cli/src/webserver/editorProxy.js +440 -0
- package/codeyam-cli/src/webserver/editorProxy.js.map +1 -0
- package/codeyam-cli/src/webserver/scripts/codeyam-preload.mjs +175 -0
- package/codeyam-cli/src/webserver/scripts/journalCapture.ts +140 -0
- package/codeyam-cli/src/webserver/server.js +226 -1
- package/codeyam-cli/src/webserver/server.js.map +1 -1
- package/codeyam-cli/src/webserver/terminalServer.js +698 -0
- package/codeyam-cli/src/webserver/terminalServer.js.map +1 -0
- package/codeyam-cli/templates/codeyam-editor-claude.md +68 -0
- package/codeyam-cli/templates/editor-step-hook.py +147 -0
- package/codeyam-cli/templates/isolation-route/next-app.tsx.template +80 -0
- package/codeyam-cli/templates/isolation-route/next-pages.tsx.template +79 -0
- package/codeyam-cli/templates/isolation-route/vite-react.tsx.template +78 -0
- package/codeyam-cli/templates/msw/browser-setup.ts.template +47 -0
- package/codeyam-cli/templates/msw/handler-router.ts.template +47 -0
- package/codeyam-cli/templates/msw/server-setup.ts.template +52 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/PRISMA_SETUP.md +84 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/api/todos/route.ts +17 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/globals.css +26 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/layout.tsx +34 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/lib/prisma.ts +19 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/app/page.tsx +10 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/eslint.config.mjs +11 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/gitignore +43 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/next.config.ts +14 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/package.json +35 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/postcss.config.mjs +7 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/schema.prisma +27 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma/seed.ts +37 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/prisma.config.ts +12 -0
- package/codeyam-cli/templates/nextjs-prisma-sqlite/tsconfig.json +34 -0
- package/codeyam-cli/templates/prompts/conversation-guidance.txt +12 -0
- package/codeyam-cli/templates/prompts/conversation-prompt.txt +3 -3
- package/codeyam-cli/templates/prompts/interruption-prompt.txt +3 -3
- package/codeyam-cli/templates/prompts/stale-rules-prompt.txt +3 -3
- package/codeyam-cli/templates/rule-notification-hook.py +44 -17
- package/codeyam-cli/templates/rule-reflection-hook.py +24 -4
- package/codeyam-cli/templates/rules-instructions.md +4 -3
- package/codeyam-cli/templates/skills/codeyam-dev-mode/SKILL.md +237 -0
- package/codeyam-cli/templates/skills/codeyam-editor/SKILL.md +69 -0
- package/codeyam-cli/templates/{codeyam-memory.md → skills/codeyam-memory/SKILL.md} +215 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/deprecated-prompt.md +100 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/detect-deprecated-patterns.sh +108 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/find-exports.sh +69 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/holistic-analysis/misleading-api-prompt.md +117 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/analyze-prompt.md +46 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/cleanup.sh +12 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/filter.jq +45 -0
- package/codeyam-cli/templates/skills/codeyam-memory/scripts/session-mining/preprocess.sh +139 -0
- package/package.json +4 -2
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js +22 -4
- package/packages/ai/src/lib/astScopes/astScopeAnalyzer.js.map +1 -1
- package/packages/ai/src/lib/completionCall.js +10 -2
- package/packages/ai/src/lib/completionCall.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js +21 -0
- package/packages/ai/src/lib/dataStructure/ScopeDataStructure.js.map +1 -1
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js +54 -0
- package/packages/ai/src/lib/dataStructure/helpers/coercePrimitivesToArraysBySchema.js.map +1 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js +34 -0
- package/packages/ai/src/lib/dataStructure/helpers/stripNullableMarkers.js.map +1 -0
- package/packages/ai/src/lib/generateEntityScenarioData.js +57 -2
- package/packages/ai/src/lib/generateEntityScenarioData.js.map +1 -1
- package/packages/analyze/src/lib/ProjectAnalyzer.js +3 -0
- package/packages/analyze/src/lib/ProjectAnalyzer.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js +8 -1
- package/packages/analyze/src/lib/files/analyze/analyzeEntities.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js +0 -5
- package/packages/analyze/src/lib/files/analyze/dependencyResolver.js.map +1 -1
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js +9 -0
- package/packages/analyze/src/lib/files/analyze/findOrCreateEntity.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js +54 -27
- package/packages/analyze/src/lib/files/scenarios/TransformationTracer.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js +65 -0
- package/packages/analyze/src/lib/files/scenarios/generateDataStructure.js.map +1 -1
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js +18 -4
- package/packages/analyze/src/lib/files/scenarios/mergeInDependentDataStructure.js.map +1 -1
- package/packages/database/index.js +1 -0
- package/packages/database/index.js.map +1 -1
- package/packages/database/src/lib/kysely/db.js +5 -0
- package/packages/database/src/lib/kysely/db.js.map +1 -1
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js +45 -0
- package/packages/database/src/lib/kysely/tables/editorScenariosTable.js.map +1 -0
- package/packages/database/src/lib/loadCommits.js +23 -13
- package/packages/database/src/lib/loadCommits.js.map +1 -1
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js +1 -4
- package/packages/database/src/lib/loadReadyToBeCapturedAnalyses.js.map +1 -1
- package/packages/database/src/lib/updateCommitMetadata.js +100 -89
- package/packages/database/src/lib/updateCommitMetadata.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatus.js +41 -30
- package/packages/database/src/lib/updateFreshAnalysisStatus.js.map +1 -1
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js +68 -57
- package/packages/database/src/lib/updateFreshAnalysisStatusWithScenarios.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js +29 -1
- package/packages/generate/src/lib/componentScenarioPage/generateScenarioClientWrapper.js.map +1 -1
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js +33 -5
- package/packages/generate/src/lib/componentScenarioPage/getIFrameMessageListenerCode.js.map +1 -1
- package/scripts/npm-post-install.cjs +34 -0
- package/codeyam-cli/src/webserver/app/routes/api.agent-transcripts.js +0 -486
- package/codeyam-cli/src/webserver/app/routes/api.agent-transcripts.js.map +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/InlineSpinner-C1rIyZdV.js +0 -34
- package/codeyam-cli/src/webserver/build/client/assets/agent-transcripts-DxCa1oBt.js +0 -23
- package/codeyam-cli/src/webserver/build/client/assets/dev.empty-DmzSmblj.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha.scenarios._scenarioId.fullscreen-DVTcUnur.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/entity._sha_.create-scenario-BVgNO76F.js +0 -6
- package/codeyam-cli/src/webserver/build/client/assets/globals-B4MPiL7S.css +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/manifest-c1fc3656.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/memory-CfpYxpNu.js +0 -93
- package/codeyam-cli/src/webserver/build/client/assets/root-CAAbm4U5.js +0 -62
- package/codeyam-cli/src/webserver/build/client/assets/settings-BpLDWmGh.js +0 -1
- package/codeyam-cli/src/webserver/build/client/assets/useLastLogLine-DZp6rrQD.js +0 -2
- package/codeyam-cli/src/webserver/build/server/assets/index-B8A_aaGG.js +0 -1
- package/codeyam-cli/src/webserver/build/server/assets/server-build-69rRZnZo.js +0 -286
- package/scripts/finalize-analyzer.cjs +0 -13
- /package/codeyam-cli/templates/{codeyam-diagnose.md → commands/codeyam-diagnose.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-debug.md → skills/codeyam-debug/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-new-rule.md → skills/codeyam-new-rule/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-setup.md → skills/codeyam-setup/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-sim.md → skills/codeyam-sim/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-test.md → skills/codeyam-test/SKILL.md} +0 -0
- /package/codeyam-cli/templates/{codeyam-verify.md → skills/codeyam-verify/SKILL.md} +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
{
|
|
2
|
-
"buildTimestamp": "2026-
|
|
3
|
-
"buildTime":
|
|
4
|
-
"gitCommit": "
|
|
2
|
+
"buildTimestamp": "2026-03-03T21:38:29.205Z",
|
|
3
|
+
"buildTime": 1772573909205,
|
|
4
|
+
"gitCommit": "d6e9b191c6db7a9b47f3bf984e4387e2c0607deb",
|
|
5
5
|
"nodeVersion": "v20.20.0",
|
|
6
|
-
"contentHash": "
|
|
7
|
-
"buildNumber":
|
|
8
|
-
"semanticVersion": "0.1.
|
|
9
|
-
"version": "0.1.
|
|
6
|
+
"contentHash": "56095f026fcf9575b86866f4fe3d3d61b9466cf70e4d3f16001752fd1febd7c2",
|
|
7
|
+
"buildNumber": 829,
|
|
8
|
+
"semanticVersion": "0.1.829",
|
|
9
|
+
"version": "0.1.829 (2026-03-03T21:38+56095f0)"
|
|
10
10
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
|
|
2
|
-
[
|
|
3
|
-
[
|
|
2
|
+
[3/3/2026, 9:38:29 PM] > codeyam-combo@1.0.0 mergeDependencies
|
|
3
|
+
[3/3/2026, 9:38:29 PM] > node ./scripts/mergePackageJsonFiles.cjs
|
|
4
4
|
|
|
5
5
|
|
|
6
|
-
[
|
|
6
|
+
[3/3/2026, 9:38:29 PM] Merged dependencies into root package.json
|
|
7
7
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
"dependencies": {
|
|
10
10
|
"@aws-sdk/client-cloudwatch-logs": "^3.990.0",
|
|
11
11
|
"@aws-sdk/client-cloudfront": "^3.990.0",
|
|
12
|
-
"@aws-sdk/client-codebuild": "^3.
|
|
12
|
+
"@aws-sdk/client-codebuild": "^3.990.0",
|
|
13
13
|
"@aws-sdk/client-dynamodb": "^3.990.0",
|
|
14
14
|
"@aws-sdk/client-ec2": "^3.990.0",
|
|
15
15
|
"@aws-sdk/client-ecr": "^3.990.0",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"@aws-sdk/client-sqs": "^3.990.0",
|
|
19
19
|
"@aws-sdk/lib-storage": "^3.990.0",
|
|
20
20
|
"@aws-sdk/util-dynamodb": "^3.990.0",
|
|
21
|
-
"@octokit/auth-app": "^8.
|
|
21
|
+
"@octokit/auth-app": "^8.2.0",
|
|
22
22
|
"@octokit/rest": "^22.0.0",
|
|
23
23
|
"@sendgrid/mail": "^8.1.4",
|
|
24
24
|
"@supabase/supabase-js": "2.88.0",
|
|
@@ -44,12 +44,12 @@
|
|
|
44
44
|
"pluralize": "^8.0.0",
|
|
45
45
|
"yargs": "^18.0.0",
|
|
46
46
|
"json5": "^2.2.3",
|
|
47
|
-
"@anthropic-ai/sdk": "^0.
|
|
47
|
+
"@anthropic-ai/sdk": "^0.78.0",
|
|
48
48
|
"@aws-sdk/s3-request-presigner": "^3.990.0",
|
|
49
|
-
"better-sqlite3": "^12.
|
|
49
|
+
"better-sqlite3": "^12.6.2",
|
|
50
50
|
"fetch-retry": "^6.0.0",
|
|
51
51
|
"kysely": "^0.28.11",
|
|
52
|
-
"pg": "^8.
|
|
52
|
+
"pg": "^8.19.0",
|
|
53
53
|
"@octokit/request": "^10.0.3",
|
|
54
54
|
"lucide-react": "^0.556.0",
|
|
55
55
|
"react-resizable": "^3.0.5"
|
|
@@ -62,7 +62,7 @@
|
|
|
62
62
|
"@types/jsdom": "^27.0.0",
|
|
63
63
|
"@types/better-sqlite3": "^7.6.13",
|
|
64
64
|
"@types/jest": "^30.0.0",
|
|
65
|
-
"@types/pg": "^8.
|
|
65
|
+
"@types/pg": "^8.18.0",
|
|
66
66
|
"@types/ws": "^8.18.1",
|
|
67
67
|
"@octokit/types": "^16.0.0",
|
|
68
68
|
"@types/react": "^19.2.7",
|
|
@@ -909,11 +909,42 @@ export class ASTScopeAnalyzer {
|
|
|
909
909
|
if (tsType.flags & ts.TypeFlags.Union) {
|
|
910
910
|
const unionType = tsType as ts.UnionType;
|
|
911
911
|
|
|
912
|
-
// Check if it's a string literal union
|
|
913
|
-
|
|
912
|
+
// Check if it's a string literal union (optionally with null/undefined).
|
|
913
|
+
// Preserve literal values so the LLM knows which values are valid when
|
|
914
|
+
// generating mock data. Without this, types like
|
|
915
|
+
// 'suggestion' | 'warning' | 'achievement' | 'tip' become just 'string'
|
|
916
|
+
// and the LLM generates invalid values (e.g. "Motivational").
|
|
917
|
+
const stringLiterals = unionType.types.filter(
|
|
914
918
|
(t) => (t.flags & ts.TypeFlags.StringLiteral) !== 0,
|
|
915
919
|
);
|
|
916
|
-
|
|
920
|
+
const nullishTypes = unionType.types.filter(
|
|
921
|
+
(t) =>
|
|
922
|
+
(t.flags & ts.TypeFlags.Undefined) !== 0 ||
|
|
923
|
+
(t.flags & ts.TypeFlags.Null) !== 0,
|
|
924
|
+
);
|
|
925
|
+
|
|
926
|
+
if (
|
|
927
|
+
stringLiterals.length > 0 &&
|
|
928
|
+
stringLiterals.length + nullishTypes.length === unionType.types.length
|
|
929
|
+
) {
|
|
930
|
+
const literalValues = stringLiterals.map(
|
|
931
|
+
(t) => `'${(t as ts.LiteralType).value}'`,
|
|
932
|
+
);
|
|
933
|
+
const literalUnion = literalValues.join(' | ');
|
|
934
|
+
|
|
935
|
+
if (nullishTypes.length > 0) {
|
|
936
|
+
const nullishParts: string[] = [];
|
|
937
|
+
if (nullishTypes.some((t) => (t.flags & ts.TypeFlags.Null) !== 0))
|
|
938
|
+
nullishParts.push('null');
|
|
939
|
+
if (
|
|
940
|
+
nullishTypes.some((t) => (t.flags & ts.TypeFlags.Undefined) !== 0)
|
|
941
|
+
)
|
|
942
|
+
nullishParts.push('undefined');
|
|
943
|
+
return `${literalUnion} | ${nullishParts.join(' | ')}`;
|
|
944
|
+
}
|
|
945
|
+
|
|
946
|
+
return literalUnion;
|
|
947
|
+
}
|
|
917
948
|
|
|
918
949
|
// Check if it's a number literal union
|
|
919
950
|
const isAllNumberLiterals = unionType.types.every(
|
|
@@ -134,7 +134,7 @@ export default async function completionCall({
|
|
|
134
134
|
};
|
|
135
135
|
const params = lib.openai.chatRequestToOpenAIChatParams(chatRequest);
|
|
136
136
|
|
|
137
|
-
const
|
|
137
|
+
const chatCompletionResult = await queue.add(() => {
|
|
138
138
|
queueEndTime = Date.now();
|
|
139
139
|
return PRetry(
|
|
140
140
|
async () => {
|
|
@@ -185,6 +185,12 @@ export default async function completionCall({
|
|
|
185
185
|
},
|
|
186
186
|
);
|
|
187
187
|
});
|
|
188
|
+
|
|
189
|
+
if (!chatCompletionResult) {
|
|
190
|
+
throw new Error('Completion call returned no result');
|
|
191
|
+
}
|
|
192
|
+
|
|
193
|
+
const chatCompletion = chatCompletionResult;
|
|
188
194
|
const endTime = Date.now();
|
|
189
195
|
|
|
190
196
|
const llmCallStats = getLLMCallStats({
|
|
@@ -304,7 +310,7 @@ ${completion}
|
|
|
304
310
|
|
|
305
311
|
Please provide a corrected version with valid JSON only. Do not include any explanatory text, just the valid JSON object.`;
|
|
306
312
|
|
|
307
|
-
const
|
|
313
|
+
const correctionChatCompletionResult = await queue.add(() => {
|
|
308
314
|
return PRetry(
|
|
309
315
|
async () => {
|
|
310
316
|
const correctionStartTime = Date.now();
|
|
@@ -359,6 +365,12 @@ Please provide a corrected version with valid JSON only. Do not include any expl
|
|
|
359
365
|
);
|
|
360
366
|
});
|
|
361
367
|
|
|
368
|
+
if (!correctionChatCompletionResult) {
|
|
369
|
+
throw new Error('Correction call returned no result');
|
|
370
|
+
}
|
|
371
|
+
|
|
372
|
+
const correctionChatCompletion = correctionChatCompletionResult;
|
|
373
|
+
|
|
362
374
|
const correctedRawCompletion =
|
|
363
375
|
correctionChatCompletion.choices?.[0]?.message?.content;
|
|
364
376
|
|
|
@@ -1108,6 +1108,33 @@ export class ScopeDataStructure {
|
|
|
1108
1108
|
return;
|
|
1109
1109
|
}
|
|
1110
1110
|
|
|
1111
|
+
// Case 3: Circular reference through scope-suffixed names (____cyScope pattern)
|
|
1112
|
+
// When a named arrow function is defined inside a scope (e.g., useEffect callback):
|
|
1113
|
+
// const identifyUser = async () => { ... };
|
|
1114
|
+
// identifyUser();
|
|
1115
|
+
// This creates a variable "identifyUser" and a scope "identifyUser____cyScope9F".
|
|
1116
|
+
// Mutual equivalencies between these cause infinite loops in Phase 2 because
|
|
1117
|
+
// processing one triggers addToSchema → followEquivalencies → addEquivalency
|
|
1118
|
+
// on the reverse, which repeats indefinitely.
|
|
1119
|
+
// Only block when the REVERSE direction already exists (creating a cycle).
|
|
1120
|
+
// The initial one-directional equivalency is necessary for scope resolution.
|
|
1121
|
+
if (
|
|
1122
|
+
path &&
|
|
1123
|
+
equivalentPath &&
|
|
1124
|
+
(equivalentPath.startsWith(path + '____') ||
|
|
1125
|
+
path.startsWith(equivalentPath + '____'))
|
|
1126
|
+
) {
|
|
1127
|
+
// Check if the reverse equivalency already exists
|
|
1128
|
+
const reverseEquivalencies =
|
|
1129
|
+
scopeNode.equivalencies[equivalentPath] || [];
|
|
1130
|
+
const reverseExists = reverseEquivalencies.some(
|
|
1131
|
+
(v) => v.schemaPath === path,
|
|
1132
|
+
);
|
|
1133
|
+
if (reverseExists) {
|
|
1134
|
+
return;
|
|
1135
|
+
}
|
|
1136
|
+
}
|
|
1137
|
+
|
|
1111
1138
|
if (!equivalentScopeName) {
|
|
1112
1139
|
console.error(
|
|
1113
1140
|
'CodeYam Error: Missing equivalent scope name - FULL CONTEXT:',
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Coerces primitive values to empty arrays when the schema expects an array.
|
|
3
|
+
*
|
|
4
|
+
* The LLM sometimes generates a primitive (boolean, number, string) where the
|
|
5
|
+
* schema expects an array. For example:
|
|
6
|
+
* Schema: { webapps: [{ name: "string" }] }
|
|
7
|
+
* LLM output: { webapps: true }
|
|
8
|
+
*
|
|
9
|
+
* This causes runtime errors like `TypeError: config.webapps?.forEach is not a function`
|
|
10
|
+
* because the code expects an array but gets a boolean.
|
|
11
|
+
*
|
|
12
|
+
* Coercion rule:
|
|
13
|
+
* - primitive → array: replace with []
|
|
14
|
+
*
|
|
15
|
+
* Null and undefined values are preserved (they may be intentionally nullable).
|
|
16
|
+
*
|
|
17
|
+
* @param data The mock data object to coerce (mutated in place)
|
|
18
|
+
* @param schema The schema describing expected types
|
|
19
|
+
*/
|
|
20
|
+
export default function coercePrimitivesToArraysBySchema<T>(
|
|
21
|
+
data: T,
|
|
22
|
+
schema: unknown,
|
|
23
|
+
): T {
|
|
24
|
+
if (data === null || data === undefined) {
|
|
25
|
+
return data;
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
if (typeof data !== 'object') {
|
|
29
|
+
return data;
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
if (Array.isArray(data)) {
|
|
33
|
+
const itemSchema = Array.isArray(schema) ? schema[0] : undefined;
|
|
34
|
+
for (let i = 0; i < data.length; i++) {
|
|
35
|
+
data[i] = coercePrimitivesToArraysBySchema(data[i], itemSchema);
|
|
36
|
+
}
|
|
37
|
+
return data;
|
|
38
|
+
}
|
|
39
|
+
|
|
40
|
+
const dataObj = data as Record<string, unknown>;
|
|
41
|
+
const schemaObj = schema as Record<string, unknown> | undefined;
|
|
42
|
+
|
|
43
|
+
for (const key of Object.keys(dataObj)) {
|
|
44
|
+
const value = dataObj[key];
|
|
45
|
+
const fieldSchema = schemaObj?.[key];
|
|
46
|
+
|
|
47
|
+
if (value === null || value === undefined) {
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
if (typeof value !== 'object' && Array.isArray(fieldSchema)) {
|
|
52
|
+
// Schema expects an array but the value is a primitive.
|
|
53
|
+
// Replace with an empty array.
|
|
54
|
+
dataObj[key] = [];
|
|
55
|
+
} else if (typeof value === 'object' && value !== null) {
|
|
56
|
+
// Both value and schema are objects — recurse
|
|
57
|
+
coercePrimitivesToArraysBySchema(value, fieldSchema);
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
|
|
61
|
+
return data;
|
|
62
|
+
}
|
|
@@ -19,6 +19,8 @@ import convertNullToUndefinedBySchema from './dataStructure/helpers/convertNullT
|
|
|
19
19
|
import convertTypeAnnotationsToValues from './dataStructure/helpers/convertTypeAnnotationsToValues';
|
|
20
20
|
import fixNullIdsBySchema from './dataStructure/helpers/fixNullIdsBySchema';
|
|
21
21
|
import coerceObjectsToPrimitivesBySchema from './dataStructure/helpers/coerceObjectsToPrimitivesBySchema';
|
|
22
|
+
import coercePrimitivesToArraysBySchema from './dataStructure/helpers/coercePrimitivesToArraysBySchema';
|
|
23
|
+
import stripNullableMarkers from './dataStructure/helpers/stripNullableMarkers';
|
|
22
24
|
import { JsonTypeDefinition } from '~codeyam/types';
|
|
23
25
|
import { deepMerge } from '~codeyam/generate';
|
|
24
26
|
import {
|
|
@@ -172,6 +174,46 @@ function findKeyPath(
|
|
|
172
174
|
return null;
|
|
173
175
|
}
|
|
174
176
|
|
|
177
|
+
/**
|
|
178
|
+
* Strip primitive values from `source` when the `destination` already has an
|
|
179
|
+
* array or object at the same key. Returns a cleaned copy of source (or null
|
|
180
|
+
* if nothing remains after stripping).
|
|
181
|
+
*
|
|
182
|
+
* This prevents misplaced LLM data (e.g., `{ webapps: true }`) from
|
|
183
|
+
* overwriting correct complex values (e.g., `{ webapps: [...] }`) during
|
|
184
|
+
* deep merge in relocateMisplacedNestedKeys.
|
|
185
|
+
*/
|
|
186
|
+
function stripPrimitivesOverwritingComplexValues(
|
|
187
|
+
destination: Record<string, unknown>,
|
|
188
|
+
source: unknown,
|
|
189
|
+
): Record<string, unknown> | null {
|
|
190
|
+
if (typeof source !== 'object' || source === null || Array.isArray(source)) {
|
|
191
|
+
return null;
|
|
192
|
+
}
|
|
193
|
+
|
|
194
|
+
const result: Record<string, unknown> = {};
|
|
195
|
+
let hasKeys = false;
|
|
196
|
+
|
|
197
|
+
for (const key of Object.keys(source as Record<string, unknown>)) {
|
|
198
|
+
const srcVal = (source as Record<string, unknown>)[key];
|
|
199
|
+
const dstVal = destination[key];
|
|
200
|
+
|
|
201
|
+
// If destination has an array or object but source has a primitive, skip it
|
|
202
|
+
if (
|
|
203
|
+
typeof dstVal === 'object' &&
|
|
204
|
+
dstVal !== null &&
|
|
205
|
+
typeof srcVal !== 'object'
|
|
206
|
+
) {
|
|
207
|
+
continue;
|
|
208
|
+
}
|
|
209
|
+
|
|
210
|
+
result[key] = srcVal;
|
|
211
|
+
hasKeys = true;
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
return hasKeys ? result : null;
|
|
215
|
+
}
|
|
216
|
+
|
|
175
217
|
/**
|
|
176
218
|
* Relocate misplaced nested keys in mockData to their correct position
|
|
177
219
|
* based on the dataForMocks structure.
|
|
@@ -233,12 +275,22 @@ function relocateMisplacedNestedKeys(
|
|
|
233
275
|
}
|
|
234
276
|
|
|
235
277
|
// Deep merge the value into the correct location
|
|
236
|
-
// Use deep merge to preserve existing data at that location
|
|
278
|
+
// Use deep merge to preserve existing data at that location.
|
|
279
|
+
// Before merging, strip primitives from the misplaced value that would
|
|
280
|
+
// overwrite arrays/objects at the destination. The misplaced data is lower
|
|
281
|
+
// quality — the LLM put it in the wrong place — so primitives like `true`
|
|
282
|
+
// should not overwrite correct complex values like arrays.
|
|
237
283
|
if (current[key] !== undefined && typeof current[key] === 'object') {
|
|
238
|
-
|
|
284
|
+
const safeValue = stripPrimitivesOverwritingComplexValues(
|
|
239
285
|
current[key] as Record<string, unknown>,
|
|
240
286
|
value as Record<string, unknown>,
|
|
241
287
|
);
|
|
288
|
+
if (safeValue !== null) {
|
|
289
|
+
current[key] = deepMerge(
|
|
290
|
+
current[key] as Record<string, unknown>,
|
|
291
|
+
safeValue,
|
|
292
|
+
);
|
|
293
|
+
}
|
|
242
294
|
} else {
|
|
243
295
|
current[key] = value;
|
|
244
296
|
}
|
|
@@ -1063,6 +1115,18 @@ export async function generateDataForScenario({
|
|
|
1063
1115
|
);
|
|
1064
1116
|
}
|
|
1065
1117
|
|
|
1118
|
+
// Strip _nullable markers from LLM-generated mock data.
|
|
1119
|
+
// The _nullable marker is an internal CodeYam concept used in type definitions
|
|
1120
|
+
// to indicate that a field can be null/undefined. The LLM sometimes includes
|
|
1121
|
+
// these markers in its generated data, which causes runtime errors when code
|
|
1122
|
+
// iterates over object keys (e.g., Object.keys(importedBy) picks up "_nullable",
|
|
1123
|
+
// then Object.keys(importedBy["_nullable"]) calls Object.keys(null) and throws).
|
|
1124
|
+
if (fullScenarioData.data.mockData) {
|
|
1125
|
+
stripNullableMarkers(
|
|
1126
|
+
fullScenarioData.data.mockData as Record<string, unknown>,
|
|
1127
|
+
);
|
|
1128
|
+
}
|
|
1129
|
+
|
|
1066
1130
|
// Relocate misplaced nested keys to their correct position.
|
|
1067
1131
|
// The LLM sometimes places nested keys at root level instead of inside their
|
|
1068
1132
|
// parent object (e.g., 'fastener' at root instead of inside 'trpc').
|
|
@@ -1098,6 +1162,18 @@ export async function generateDataForScenario({
|
|
|
1098
1162
|
);
|
|
1099
1163
|
}
|
|
1100
1164
|
|
|
1165
|
+
// Coerce primitives to empty arrays when the schema expects an array.
|
|
1166
|
+
// The LLM sometimes generates a primitive (e.g., `webapps: true`) where the
|
|
1167
|
+
// schema expects an array (e.g., `webapps: [{ name: "string" }]`).
|
|
1168
|
+
// This causes runtime errors like "TypeError: config.webapps?.forEach is not a function".
|
|
1169
|
+
// Must run AFTER coerceObjectsToPrimitivesBySchema and BEFORE convertCommaSeparatedStringsToArrays.
|
|
1170
|
+
if (structure.dataForMocks && fullScenarioData.data.mockData) {
|
|
1171
|
+
coercePrimitivesToArraysBySchema(
|
|
1172
|
+
fullScenarioData.data.mockData,
|
|
1173
|
+
structure.dataForMocks,
|
|
1174
|
+
);
|
|
1175
|
+
}
|
|
1176
|
+
|
|
1101
1177
|
// Convert comma-separated strings to arrays when appropriate.
|
|
1102
1178
|
// The LLM sometimes generates strings like "color,size" instead of arrays
|
|
1103
1179
|
// like ["color", "size"] when the schema type is incorrectly inferred as
|
|
@@ -46,6 +46,12 @@ export class ProjectAnalyzer {
|
|
|
46
46
|
lib.asts.createProgramFromTsConfigPath(configPath, excludePatterns),
|
|
47
47
|
);
|
|
48
48
|
|
|
49
|
+
if (this.programs.length === 0) {
|
|
50
|
+
throw new Error(
|
|
51
|
+
'No TypeScript programs could be created — no tsconfig.json found',
|
|
52
|
+
);
|
|
53
|
+
}
|
|
54
|
+
|
|
49
55
|
// Primary program is the first one (usually root) for backward compatibility
|
|
50
56
|
this.program = this.programs[0];
|
|
51
57
|
this.typeChecker = this.program.getTypeChecker();
|
|
@@ -310,7 +310,15 @@ export default async function analyzeEntities({
|
|
|
310
310
|
);
|
|
311
311
|
|
|
312
312
|
// Flush transformation trace if tracing is enabled
|
|
313
|
-
|
|
313
|
+
// Wrapped in try/catch because trace data can exceed V8's max string length
|
|
314
|
+
// for large projects, and we must not crash the analysis process over tracing.
|
|
315
|
+
try {
|
|
316
|
+
transformationTracer.flush();
|
|
317
|
+
} catch (e) {
|
|
318
|
+
console.warn(
|
|
319
|
+
`CodeYam Warning: Failed to flush transformation trace: ${e.message}`,
|
|
320
|
+
);
|
|
321
|
+
}
|
|
314
322
|
|
|
315
323
|
return analyses;
|
|
316
324
|
|
|
@@ -100,12 +100,6 @@ export function getCandidatesReadyForCapture(
|
|
|
100
100
|
continue;
|
|
101
101
|
}
|
|
102
102
|
|
|
103
|
-
// Skip notExported entities - they can't be imported into the simulation
|
|
104
|
-
// environment and will always fail capture. Don't mark them as ready.
|
|
105
|
-
if (candidate.entity?.metadata?.notExported) {
|
|
106
|
-
continue;
|
|
107
|
-
}
|
|
108
|
-
|
|
109
103
|
// Get all transitive dependencies
|
|
110
104
|
const candidateKey = `${candidate.filePath}:${candidate.entityName}`;
|
|
111
105
|
const { missingDependencies } = getTransitiveDependencies(
|
|
@@ -138,6 +138,18 @@ export default async function findOrCreateEntity({
|
|
|
138
138
|
break;
|
|
139
139
|
}
|
|
140
140
|
}
|
|
141
|
+
|
|
142
|
+
// Mark previous versions as superseded
|
|
143
|
+
const entitiesToSupersede = previousEntities.filter(
|
|
144
|
+
(e) => !e.metadata?.isSuperseded,
|
|
145
|
+
);
|
|
146
|
+
if (entitiesToSupersede.length > 0) {
|
|
147
|
+
for (const prev of entitiesToSupersede) {
|
|
148
|
+
prev.metadata = prev.metadata || {};
|
|
149
|
+
prev.metadata.isSuperseded = true;
|
|
150
|
+
}
|
|
151
|
+
await upsertEntities(entitiesToSupersede);
|
|
152
|
+
}
|
|
141
153
|
}
|
|
142
154
|
|
|
143
155
|
entity = {
|
|
@@ -404,22 +404,15 @@ export class TransformationTracer {
|
|
|
404
404
|
}
|
|
405
405
|
|
|
406
406
|
/**
|
|
407
|
-
*
|
|
407
|
+
* Compute the summary data for the current traces.
|
|
408
408
|
*/
|
|
409
|
-
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
const entities = Array.from(this.traces.keys());
|
|
417
|
-
const stageCounts = entities
|
|
418
|
-
.map((e) => `${e}(${this.traces.get(e)!.stages.length})`)
|
|
419
|
-
.join(', ');
|
|
420
|
-
this.log(`flush: writing ${entities.length} entities: ${stageCounts}`);
|
|
421
|
-
|
|
422
|
-
// Compute summary
|
|
409
|
+
private computeFlushSummary(): {
|
|
410
|
+
stageChangeCounts: Record<
|
|
411
|
+
string,
|
|
412
|
+
{ added: number; removed: number; changed: number }
|
|
413
|
+
>;
|
|
414
|
+
entitiesWithMostChanges: string[];
|
|
415
|
+
} {
|
|
423
416
|
const stageChangeCounts: Record<
|
|
424
417
|
string,
|
|
425
418
|
{ added: number; removed: number; changed: number }
|
|
@@ -484,17 +477,39 @@ export class TransformationTracer {
|
|
|
484
477
|
.slice(0, 10)
|
|
485
478
|
.map(([name]) => name);
|
|
486
479
|
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
480
|
+
return { stageChangeCounts, entitiesWithMostChanges };
|
|
481
|
+
}
|
|
482
|
+
|
|
483
|
+
/**
|
|
484
|
+
* Write the trace to the output file.
|
|
485
|
+
* Uses streaming per-entity writes to avoid exceeding V8's max string length
|
|
486
|
+
* on large projects.
|
|
487
|
+
*/
|
|
488
|
+
flush(): void {
|
|
489
|
+
if (!this.isEnabled()) return;
|
|
490
|
+
if (this.traces.size === 0) {
|
|
491
|
+
this.log('flush: no traces to write');
|
|
492
|
+
return;
|
|
493
|
+
}
|
|
494
|
+
|
|
495
|
+
const entities = Array.from(this.traces.keys());
|
|
496
|
+
const stageCounts = entities
|
|
497
|
+
.map((e) => `${e}(${this.traces.get(e)!.stages.length})`)
|
|
498
|
+
.join(', ');
|
|
499
|
+
this.log(`flush: writing ${entities.length} entities: ${stageCounts}`);
|
|
500
|
+
|
|
501
|
+
const { stageChangeCounts, entitiesWithMostChanges } =
|
|
502
|
+
this.computeFlushSummary();
|
|
503
|
+
|
|
504
|
+
const meta = {
|
|
505
|
+
timestamp: new Date().toISOString(),
|
|
506
|
+
projectSlug: this.projectSlug,
|
|
507
|
+
entityCount: this.traces.size,
|
|
508
|
+
};
|
|
509
|
+
|
|
510
|
+
const summary = {
|
|
511
|
+
stageChangeCounts,
|
|
512
|
+
entitiesWithMostChanges,
|
|
498
513
|
};
|
|
499
514
|
|
|
500
515
|
// Ensure directory exists
|
|
@@ -503,8 +518,30 @@ export class TransformationTracer {
|
|
|
503
518
|
fs.mkdirSync(dir, { recursive: true });
|
|
504
519
|
}
|
|
505
520
|
|
|
506
|
-
|
|
507
|
-
|
|
521
|
+
// Stream JSON per-entity to avoid exceeding V8's max string length.
|
|
522
|
+
// Each entity is serialized individually so no single JSON.stringify
|
|
523
|
+
// call needs to produce the entire trace.
|
|
524
|
+
const fd = fs.openSync(this.outputPath, 'w');
|
|
525
|
+
try {
|
|
526
|
+
fs.writeSync(fd, '{\n "meta": ');
|
|
527
|
+
fs.writeSync(fd, JSON.stringify(meta, null, 2));
|
|
528
|
+
fs.writeSync(fd, ',\n "summary": ');
|
|
529
|
+
fs.writeSync(fd, JSON.stringify(summary, null, 2));
|
|
530
|
+
fs.writeSync(fd, ',\n "entities": {');
|
|
531
|
+
|
|
532
|
+
let first = true;
|
|
533
|
+
for (const [entityName, entityTrace] of this.traces) {
|
|
534
|
+
if (!first) fs.writeSync(fd, ',');
|
|
535
|
+
fs.writeSync(fd, `\n ${JSON.stringify(entityName)}: `);
|
|
536
|
+
fs.writeSync(fd, JSON.stringify(entityTrace, null, 2));
|
|
537
|
+
first = false;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
fs.writeSync(fd, '\n }\n}\n');
|
|
541
|
+
this.log(`flush: wrote trace to ${this.outputPath}`);
|
|
542
|
+
} finally {
|
|
543
|
+
fs.closeSync(fd);
|
|
544
|
+
}
|
|
508
545
|
}
|
|
509
546
|
|
|
510
547
|
/**
|
|
@@ -461,6 +461,17 @@ export default function generateDataStructure({
|
|
|
461
461
|
|
|
462
462
|
const { isolatedDataStructure } = entity.metadata;
|
|
463
463
|
|
|
464
|
+
if (!isolatedDataStructure) {
|
|
465
|
+
awsLog(
|
|
466
|
+
'CodeYam: Skipping data structure generation — isolatedDataStructure is undefined (scope analysis may have failed)',
|
|
467
|
+
{
|
|
468
|
+
entityName: entity.name,
|
|
469
|
+
filePath: entity.filePath,
|
|
470
|
+
},
|
|
471
|
+
);
|
|
472
|
+
return analysis;
|
|
473
|
+
}
|
|
474
|
+
|
|
464
475
|
// Transformation tracing: start entity and capture isolated data structure
|
|
465
476
|
transformationTracer.startEntity({
|
|
466
477
|
name: entity.name,
|
|
@@ -643,6 +654,78 @@ export default function generateDataStructure({
|
|
|
643
654
|
},
|
|
644
655
|
);
|
|
645
656
|
|
|
657
|
+
// Infer function types from child component usage BEFORE fillInSchemaGapsAndUnknowns.
|
|
658
|
+
// When a hook returns a property with type 'unknown' that is passed to a child
|
|
659
|
+
// component which calls it as a function (e.g., isEntityPending(entity)),
|
|
660
|
+
// promote it to 'function'. Without this, name heuristics like isLikelyBoolean
|
|
661
|
+
// would mistype "isEntityPending" as boolean because of the "is" prefix.
|
|
662
|
+
//
|
|
663
|
+
// sourceEquivalencies are in isolatedDataStructure.dependencySchemas (not in
|
|
664
|
+
// mergedDataStructure.dependencySchemas — they're dropped during the merge).
|
|
665
|
+
// The child's signatureSchema (with function call evidence) IS in the merged schemas.
|
|
666
|
+
{
|
|
667
|
+
const isolatedDepSchemas =
|
|
668
|
+
entity.metadata.isolatedDataStructure?.dependencySchemas;
|
|
669
|
+
if (isolatedDepSchemas) {
|
|
670
|
+
for (const childFilePath in isolatedDepSchemas) {
|
|
671
|
+
const childIsolated = isolatedDepSchemas[childFilePath];
|
|
672
|
+
for (const childName in childIsolated) {
|
|
673
|
+
const sourceEq = childIsolated[childName]?.sourceEquivalencies;
|
|
674
|
+
if (!sourceEq) continue;
|
|
675
|
+
|
|
676
|
+
// Get the child's signatureSchema from the MERGED schemas (richer)
|
|
677
|
+
const mergedChildSchema =
|
|
678
|
+
mergedDataStructure.dependencySchemas[childFilePath]?.[
|
|
679
|
+
childName
|
|
680
|
+
];
|
|
681
|
+
const sigSchema = mergedChildSchema?.signatureSchema;
|
|
682
|
+
if (!sigSchema) continue;
|
|
683
|
+
|
|
684
|
+
for (const childPath in sourceEq) {
|
|
685
|
+
for (const source of sourceEq[childPath]) {
|
|
686
|
+
const fcrvSuffix = '.functionCallReturnValue.';
|
|
687
|
+
const fcrvIndex = source.schemaPath.indexOf(fcrvSuffix);
|
|
688
|
+
if (fcrvIndex === -1) continue;
|
|
689
|
+
|
|
690
|
+
const propName = source.schemaPath.slice(
|
|
691
|
+
fcrvIndex + fcrvSuffix.length,
|
|
692
|
+
);
|
|
693
|
+
|
|
694
|
+
// Find the corresponding child signature path
|
|
695
|
+
const entityCallPrefix = childName + '().';
|
|
696
|
+
const sigPathBase = childPath.startsWith(entityCallPrefix)
|
|
697
|
+
? childPath.slice(entityCallPrefix.length)
|
|
698
|
+
: childPath;
|
|
699
|
+
|
|
700
|
+
// Check if the child's signatureSchema has a function call version
|
|
701
|
+
let isFunction = false;
|
|
702
|
+
for (const sigKey in sigSchema) {
|
|
703
|
+
if (
|
|
704
|
+
sigKey.startsWith(sigPathBase + '(') &&
|
|
705
|
+
sigSchema[sigKey] === 'function'
|
|
706
|
+
) {
|
|
707
|
+
isFunction = true;
|
|
708
|
+
break;
|
|
709
|
+
}
|
|
710
|
+
}
|
|
711
|
+
|
|
712
|
+
if (isFunction) {
|
|
713
|
+
for (const rvKey in depSchema.returnValueSchema) {
|
|
714
|
+
if (
|
|
715
|
+
rvKey.endsWith('.' + propName) &&
|
|
716
|
+
depSchema.returnValueSchema[rvKey] === 'unknown'
|
|
717
|
+
) {
|
|
718
|
+
depSchema.returnValueSchema[rvKey] = 'function';
|
|
719
|
+
}
|
|
720
|
+
}
|
|
721
|
+
}
|
|
722
|
+
}
|
|
723
|
+
}
|
|
724
|
+
}
|
|
725
|
+
}
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
|
|
646
729
|
// Fill in type gaps BEFORE clearing attributes, so evidence like .includes()
|
|
647
730
|
// is used for type inference before being deleted
|
|
648
731
|
|